#ifndef MYQGSMAPCANVAS_H
#define MYQGSMAPCANVAS_H

#endif // MYQGSMAPCANVAS_H
// MyMapCanvas.h
#include <QMainWindow>
#include <QDebug>
#include <qgsmapcanvas.h>
#include <QMouseEvent>

class MyQgsMapCanvas : public QgsMapCanvas
{
    Q_OBJECT  // 必须包含Q_OBJECT宏

public:
    MyQgsMapCanvas(QWidget *parent = nullptr);
    ~MyQgsMapCanvas();

signals:
    void mousePressedAt(const QPoint &pos);

protected:
    void mousePressEvent(QMouseEvent *event) override;
};
